package com.hwadee.teachingprocessmanagementsystem.service.base;

import com.hwadee.teachingprocessmanagementsystem.entity.CourseChangeRequest;
import com.hwadee.teachingprocessmanagementsystem.entity.Student;
import com.hwadee.teachingprocessmanagementsystem.entity.Teacher;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 调课申请表(CourseChangeRequest)表服务接口
 *
 * @author makejava
 * @since 2024-07-11 14:20:03
 */
public interface CourseChangeRequestService {

    /**
     * 通过ID查询单条数据
     *
     * @param requestId 主键
     * @return 实例对象
     */
    CourseChangeRequest queryById(Integer requestId);

    /**
     * 分页查询
     *
     * @param courseChangeRequest 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<CourseChangeRequest> queryByPage(CourseChangeRequest courseChangeRequest, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param courseChangeRequest 实例对象
     * @return 实例对象
     */
    CourseChangeRequest insert(CourseChangeRequest courseChangeRequest);

    /**
     * 修改数据
     *
     * @param courseChangeRequest 实例对象
     * @return 实例对象
     */
    CourseChangeRequest update(CourseChangeRequest courseChangeRequest);

    /**
     * 通过主键删除数据
     *
     * @param requestId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer requestId);

    /**
     * 根据学号查询调课申请
     * @param student
     * @return
     */
    List<CourseChangeRequest> queryAllByStudentNumber(Student student);

    List<CourseChangeRequest> queryAllByTeacherId(Teacher teacher);
}
